import axios from "./index"

// 获取数据
export const PreLoanMangeApi = (obj) => {
    console.log('obj', obj);
    return axios({
        method: "POST",
        url: "/borrowCenter/beforeCredit",
        data: obj
    })
}


// 获取客户详情
export const GetCustomerInfoApi = (loan_id) => {
    console.log(loan_id);
    return axios({
        method: "GET",
        url: "/basic/information",
        params: {
            loan_id
        }
    })
}

// 提交审核结果
export const SubmitMsgApi = (obj) => {
    console.log('提交审核结果', obj);
    return axios({
        method: "POST",
        url: "/borrowCenter/addAudit",
        data: {
            approval_amount: obj.approval_amount,
            compound_interest: obj.compound_interest,
            loan_state: obj.loan_state,
            audit_result: obj.audit_result,
            auditor_id: obj.auditor_id,
            feedback: obj.feedback,
            loan_id: obj.loan_id,
            state: obj.state
        }
    })
}

// 获取审核详情
export const GetInfoDetailApi = (loan_id) => {
    console.log(loan_id);
    return axios({
        method: "GET",
        url: "/borrowCenter/allAudit",
        params: {
            loan_id
        }
    })
}